package com.xjscrm.console.chat.frame.send;

import com.xjscrm.console.chat.enums.ChatMsgType;
import com.xjscrm.console.chat.frame.dto.ChatTagDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.LinkedList;
import java.util.List;

/**
 * @author mingyang.chen create in 2024/3/12 13:47
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel
public class SPullGroupConversationResultMsg extends SResultMsg {

    @ApiModelProperty("主键id")
    private Long id;

    @ApiModelProperty("群wxid")
    private String groupWxid;

    @ApiModelProperty("群昵称")
    private String groupName;

    @ApiModelProperty("群头像")
    private String headImageUrl;

    @ApiModelProperty("建群人wxid")
    private String createWxid;

    @ApiModelProperty("建群人wx昵称")
    private String createWxName;

    @ApiModelProperty("群成员总数")
    private Integer memberTotal;

    @ApiModelProperty("群创建时间")
    private Integer groupCreateTime;

    @ApiModelProperty("管理员集合")
    private List<GroupAdminItem> admins = new LinkedList<>();

    @ApiModelProperty("标签集合")
    private List<ChatTagDTO> tags = new LinkedList<>();

    public SPullGroupConversationResultMsg() {
        this.setResultType(ChatMsgType.s_pull_group_conversation_result.getCode());
        this.setResultTypeDesc(ChatMsgType.s_pull_group_conversation_result.getDesc());
    }

    @Data
    public static class GroupAdminItem {
        @ApiModelProperty("管理员微信id")
        private String adminWxId;
        @ApiModelProperty("管理员名称")
        private String adminWxName;
        @ApiModelProperty("头像")
        private String headImageUrl;
    }
}
